How to retrieve certificate from my store personal? [closed]

Posted by shariphwar on Programmers See other posts from Programmers or by shariphwar
Published on 2012-03-21T08:23:32Z Indexed on 2012/03/21 11:38 UTC
Read the original article Hit count: 178

Filed under:
|

I want to use the following code by java program. How to convert the following C# code to java code or how to write just like this code by java programming language?

Access certificate by C#

X509Store store = null;
X509Certificate2Collection _recipients = null;
// select the right store

//if (lstRecipients.Text=="Personal")
store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
// else
// store = new X509Store(StoreName.AddressBook, StoreLocation.CurrentUser);

// open store and show certificate picker
store.Open(OpenFlags.ReadOnly);
X509Certificate2Collection tempCollection = X509Certificate2UI.SelectFromCollection(store.Certificates, "Crypter", "Select a Certificate for Encryption", X509SelectionFlag.MultiSelection);
store.Close();

© Programmers or respective owner

Related posts about java

Related posts about certificate